// +----------------------------------------------------------------------
// | FanAdmin 致力于为快速构建管理应用程序提供解决方案
// +----------------------------------------------------------------------
// | 简单轻量, 高颜值, 高效率, 让后台开发更简单
// | 代码的简洁规范, 通俗易懂, 无过度封装, 对萌新小白十分友好
// | 代码注释完整易读性高, 尽量保障初级程序员也可读懂, 极大提升二开效率
// | 同样是一个快速学习前沿技术的最佳实践, 永久免费开源使用
// +----------------------------------------------------------------------
// | Author: xiejiafan <82864861@qq.com>
// +----------------------------------------------------------------------
// | Thank you very much for using FanAdmin. https://gitee.com/xiejiafan/fanadmin
// +----------------------------------------------------------------------

import { App } from 'vue'
import auth from './modules/auth'
import waterMarker from './modules/waterMarker'
import draggable from './modules/draggable'
import debounce from './modules/debounce'
import debounceInput from './modules/debounceInput'
import throttle from './modules/throttle'
import throttleInput from './modules/throttleInput'
import adaptive from './modules/adaptive'
import adaptiveTree from './modules/adaptiveTree'
import copy from './modules/copy'

const directivesList: any = {
  auth,
  waterMarker,
  draggable,
  debounce,
  debounceInput,
  throttle,
  throttleInput,
  adaptive,
  adaptiveTree,
  copy,
}

const directives = {
  install: function (app: App<Element>) {
    Object.keys(directivesList).forEach((key) => {
      // 注册所有自定义指令
      app.directive(key, directivesList[key])
    })
  },
}

export default directives
